﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace cbmobile
{
    public class Utilis
    {
        public enum CommonStatus : int
        {
            Inactive = 0,
            Active,
            Invalid,
            Delete,
            Approved,
            UnApproved
        }

        public static long TryParseLong(object p_source)
        {
            long result = 0;
            if (p_source == DBNull.Value || p_source == null)
                return result;
            long.TryParse(p_source.ToString(), out result);
            return result;
        }

        public static int TryParseInt(object p_source)
        {
            int result = 0;
            if (p_source == DBNull.Value || p_source == null)
                return result;
            int.TryParse(p_source.ToString(), out result);
            return result;
        }
    }
}